// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0

 TestCase := Rectangle {
    property<int> a;
    property<int> t1: 4 + 3 * 2 + 2 - 50 - 2;
    property<int> t2: 500 / 2 * 30 - 1;
    property<int> t3: a - (3 + ++2 * (a + 2));
    property<int> t4: 3 + - +5 - 8 - -9 * --- 120;
    property<int> t5: (a + 1.3) * 10;

    property <length> len: 50px / 2;

    callback foo;
    foo => {
        a += +8;
        a *= 10;
        a /= 2;
        a -= 3;

        len += 1px;
        len /= 2;
        len -= 3px;
        len *= 3;
    }

    out property <bool> test:  t1 == -40 && t2 == 7499 && t3 == -(3+2 * 2) && -1090 == t4 && t5 == 13;
}
/*
```cpp
auto handle = TestCase::create();
const TestCase &instance = *handle;
assert_eq(instance.get_t1(), 4 + 3 * 2 + 2 - 50 - 2);
assert_eq(instance.get_t2(), 500 / 2 * 30 - 1);
assert_eq(instance.get_t5(), 13);
instance.set_a(42);
assert_eq(instance.get_t3(), 42 - (3 + 2 * (42 + 2)));
assert_eq(instance.get_t4(), 3 + - 5 - 8 - -9 * - - - 120);
assert_eq(instance.get_t5(), 433);
instance.invoke_foo();
assert_eq(instance.get_a(), (((42 + 8) * 10) / 2) - 3);

assert_eq(instance.get_len(), ((25.+1.)/2. - 3.) * 3.);
```


```rust
let instance = TestCase::new().unwrap();
assert_eq!(instance.get_t1(), 4 + 3 * 2 + 2 - 50 - 2);
assert_eq!(instance.get_t2(), 500 / 2 * 30 - 1);
assert_eq!(instance.get_t5(), 13);
instance.set_a(42);
assert_eq!(instance.get_t3(), 42 - (3 + 2 * (42 + 2)));
assert_eq!(instance.get_t4(), 3 + - 5 - 8 - -9 * -(-(-120)));
assert_eq!(instance.get_t5(), 433);
instance.invoke_foo();
assert_eq!(instance.get_a(), (((42 + 8) * 10) / 2) - 3);

assert_eq!(instance.get_len(), ((25.+1.)/2. - 3.) * 3.);
```

```js
var instance = new slint.TestCase({});
assert.equal(instance.t1, 4 + 3 * 2 + 2 - 50 - 2);
assert.equal(instance.t2, 500 / 2 * 30 - 1);
assert.equal(instance.t5, 13);
instance.a = 42;
assert.equal(instance.t3, 42 - (3 + 2 * (42 + 2)));
assert.equal(instance.t4, 3 + - 5 - 8 - -9 * - - - 120);
assert.equal(instance.t5, 433);
instance.foo();
assert.equal(instance.a, (((42 + 8) * 10) / 2) - 3);

assert.equal(instance.len, ((25.+1.)/2. - 3.) * 3.);
```
*/
